package com.hyacinth.common.framework.i;

import java.util.Collection;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.hyacinth.common.framework.Domain;

public interface IServiceSupport<D extends Domain> {

	/**
	 * 持久化方法
	 * @param d
	 */
	@Transactional
	void persist(D d);

	/**
	 * 
	 * @param ds
	 */
	@Transactional
	void persist(Collection<D> ds);

	@Transactional
	void remove(D d);

	@Transactional
	void remove(Collection<D> ds);
	
	@Transactional
	void feignRemove(D d);
	
	@Transactional
	void feignRemove(Collection<D> ds);

	@Transactional
	void merge(D d);

	@Transactional
	void merge(Collection<D> ds);

	D find(Long id);
	
	List<D> all();

	void refresh(D d);

}